From: Aaron Schulz Date: Sat, 3 Sep 2016 13:44:31 +0000 (-0700) Subject: Make deferred updates fully own their transaction rounds X-Git-Tag: 1.31.0-rc.0~5742^2~1 X-Git-Url: http://git.cyclocoop.org/%27%20.%20%24prefix%20.%20Wiki::transformTitleToURI%28%24matches%5B1%5D%29%20.%20%27?a=commitdiff_plain;h=b8b4f12663addb3112a5cce95eb47480fa049c86;p=lhc%2Fweb%2Fwiklou.git Make deferred updates fully own their transaction rounds This will matter when commitMasterChanges() enforcement is tighter. For now, any thing can still call that method anytime. Change-Id: I0b08e9e9118a6c6118c117e3856d0a8e0ca3d457 --- diff --git a/includes/deferred/DeferredUpdates.php b/includes/deferred/DeferredUpdates.php index 24c7930464..8de7cd91d8 100644 --- a/includes/deferred/DeferredUpdates.php +++ b/includes/deferred/DeferredUpdates.php @@ -221,9 +221,10 @@ class DeferredUpdates { private static function runUpdate( DeferrableUpdate $update, LBFactory $lbFactory, $stage ) { $guiError = null; try { - $lbFactory->beginMasterChanges( __METHOD__ ); + $fnameTrxOwner = get_class( $update ) . '::doUpdate'; + $lbFactory->beginMasterChanges( $fnameTrxOwner ); $update->doUpdate(); - $lbFactory->commitMasterChanges( __METHOD__ ); + $lbFactory->commitMasterChanges( $fnameTrxOwner ); } catch ( Exception $e ) { // Reporting GUI exceptions does not work post-send if ( $e instanceof ErrorPageError && $stage === self::PRESEND ) {